import { MANAGE_TABLE_COLUMNS } from './common';

import { getReasonTypeStr } from '../../latentProductRecord/constants/recordView';

const omitKeys = ['costPrice', 'purchasePrice', 'sellPrice']

export const TABLE_COLUMNS = MANAGE_TABLE_COLUMNS.filter(item => !omitKeys.includes(item.key))

export const TABLE_COLUMNS_WITH_REASON = [
  {
    title: '驳回原因',
    width: 120,
    render: (h, { row }) => <span>{getReasonTypeStr(row.reasonType)}</span>
  },
  {
    title: '驳回备注',
    key: 'reasonNote'
  },
  ...TABLE_COLUMNS,
]
